//
//  ConProvincesModel.m
//  Shengzhuli
//
//  Created by FXGuo on 17/3/24.
//  Copyright © 2017年 kamangkeji. All rights reserved.
//

#import "ConProvincesModel.h"

@implementation ConProvincesModel

- (instancetype)initWithDict:(NSDictionary *)dict
{
    if (self = [super init]) {
        self.name = dict[@"name"];
        NSArray *cities = dict[@"sub"];
        self.cities = [NSMutableArray array];
        for (NSInteger i=0; i<cities.count; i++) {
            ConCitiesModel *model = [ConCitiesModel objectWithDict:cities[i]];
            [self.cities addObject:model];
        }
    }
    return self;
}

+ (instancetype)objectWithDict:(NSDictionary *)dict
{
    return [[ConProvincesModel alloc]initWithDict:dict];
}

@end
